using Godot;
using Godot.Collections;
using System;
[GlobalClass]
public partial class Item : Resource
{
    public enum TYPE
    {
        //无类型
        NONE,
        //消耗品
        CONSUNMABLE,
        //装备
        EQUIPMENT,
    }
    [Export]
    public string name;
    [Export]
    public string name_CN;
    [Export]
    public string description;
    [Export]
    public Texture2D texture;
    [Export]
    public string PS; //备注
    [Export]
    public TYPE type = TYPE.NONE;
    [Export]
    public int max_stack; //最大堆叠数量
    [Export]
    public int quantity{
        get {return _quantity;}
        set { EmitSignal(SignalName.quantity_changed);
        _quantity = value;
        }
        } 
    public int _quantity;

    [Export]
    public Array<string> skills;
    [Signal]
    public delegate void quantity_changedEventHandler(int value); //数量改变信号
}
